package com.zrz.service;

import com.zrz.dao.auto.HouseInfoMapper;
import com.zrz.model.auto.HouseInfo;
import com.zrz.model.auto.HouseInfoExample;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@Service
public class HouseService {
    @Autowired
    private HouseInfoMapper houseInfoMapper;
    public List<HouseInfo> getHosuseList(Integer type){
        HouseInfoExample houseInfoExample=new HouseInfoExample();
        houseInfoExample.createCriteria().andTypeEqualTo(type);
        return houseInfoMapper.selectByExample(houseInfoExample);
    }

    public HouseInfo getHouseInfo(Integer id){
        return houseInfoMapper.selectByPrimaryKey(id);
    }
}
